<div class="roles view">
<h2><?php  __('Role');?></h2>
	<dl><?php $i = 0; $class = ' class="altrow"';?>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $role['Role']['id']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Tenchucnang'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $role['Role']['tenchucnang']; ?>
			&nbsp;
		</dd>
	</dl>
</div>
<div class="actions">
	<h3><?php __('Thực hiện'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Sửa Quyền', true), array('action' => 'edit', $role['Role']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('Xóa Quyền', true), array('action' => 'delete', $role['Role']['id']), null, sprintf(__('Bạn có muốn xóa # %s?', true), $role['Role']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('DS Quyền', true), array('action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('Quyề mới', true), array('action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('DS Phân quyền', true), array('controller' => 'phanquyens', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('Phân quyền mới', true), array('controller' => 'phanquyens', 'action' => 'add')); ?> </li>
	</ul>
</div>
<div class="related">
	<h3><?php __('Liên kết Phân quyền');?></h3>
	<?php if (!empty($role['Phanquyen'])):?>
	<table id='tables' cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Id'); ?></th>
		<th><?php __('Group Id'); ?></th>
		<th><?php __('Role Id'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($role['Phanquyen'] as $phanquyen):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $phanquyen['STT'];?></td>
			<td><?php echo $phanquyen['Mã nhóm'];?></td>
			<td><?php echo $phanquyen['Mã quyền'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('Xem', true), array('controller' => 'phanquyens', 'action' => 'view', $phanquyen['id'])); ?>
				<?php echo $this->Html->link(__('Sửa', true), array('controller' => 'phanquyens', 'action' => 'edit', $phanquyen['id'])); ?>
				<?php echo $this->Html->link(__('Xóa', true), array('controller' => 'phanquyens', 'action' => 'delete', $phanquyen['id']), null, sprintf(__('Bạn có muốn xóa # %s?', true), $phanquyen['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('Phân quyền mới', true), array('controller' => 'phanquyens', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
